package com.caineng.zhaobiao.zbapi.utils.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * 配置文件集
 * @author liandyao
 * @date 2022/7/29 16:07
 */
@Configuration
@ConfigurationProperties(prefix = "caineng")
@Data
public class ConfigYml {

    //基础路径
    public static String basePath ;


    public static String alipayCrt ;//ali支付证书存放路径

    private String apiUrl;

    public  static  String lexiconPath ;

    public static String getLexiconPath() {
        return lexiconPath;
    }

    /** 注意：静态属性读取关键点，非静态set方法 */
    public void setLexiconPath(String lexiconPath) {
        ConfigYml.lexiconPath = lexiconPath;
    }


    //基础路径,域名
    @Value("${caineng.basePath}")
    public  void setBasePath(String basePath) {
        ConfigYml.basePath = basePath;
    }

    @Value("${caineng.alipayCrt}")
    public void setAlipayCrt(String alipayCrt){
        ConfigYml.alipayCrt = alipayCrt;
    }
}
